/*
 * $Id$
 */
package py.windmill.web.article;

import java.util.List;
import java.util.Map;

/**
 *
 * @author myang
 */
public class Article {

    private int _id;
    private String _title;
    private String _name;
    private String _content;
    private String _summary;
    private String _annotation;
    private Map<String, String> _words;

    /**
     *
     * @param that
     * @param content
     */
    public Article(final Article that, final String content) {
        title(that._title).summary(that._summary)
          .annotation(that._annotation).name(that._name)
          .words(that._words).content(content);
    }

    public Article() {
    }

    public Article title(final String s) {
        _title = s;
        return this;
    }

    public Article annotation(final String s) {
        _annotation = s;
        return this;
    }

    public Article summary(final String s) {
        _summary = s;
        return this;
    }

    public Article name(final String s) {
        _name = s;
        return this;
    }

    public Article content(final String s) {
        _content = s;
        return this;
    }

    public Article words(final Map<String,String> words) {
        _words = words;
        return this;
    }
    /**
     *
     * @return
     */
    public String getTitle() {
        return _title;
    }

    /**
     *
     * @return
     */
    public String getName() {
        return _name;
    }

    /**
     *
     * @return
     */
    public String getContent() {
        return _content;
    }

    /**
     *
     * @return
     */
    public Map<String, String> getWords() {
        return _words;
    }

    /**
     *
     * @return
     */
    public String getSummary() {
        return _summary;
    }

    /**
     * 
     * @return 
     */
    public String getAnnotation() {
        return _annotation;
    }

    @Override
    public String toString() {
        return "Article{" + "_id=" + _id + ", _title=" + _title
          + ", _name=" + _name + ", _content=" + _content
          + ", _summary=" + _summary + ", _words=" + _words + '}';
    }
}
